        	Dipartimento di Ingegneria dell'Informazione
                    PROVA DI ESAME DI RETI DI CALCOLATORI
		       	    20 Giugno 2016
                         prof. Nicola Zingirian
			


Si modifichi il programma ws16.c in modo che invii l'entity body con codifica di trasferimento 
Chunked.


Si riporta la grammatica relativa alla codifica Chunked dalla RFC 2616 


The chunked encoding modifies the body of a message in order to
 transfer it as a series of chunks, each with its own size indicator,
   followed by an OPTIONAL trailer containing entity-header fields. This
   allows dynamically produced content to be transferred along with the
   information necessary for the recipient to verify that it has
   received the full message.

       Chunked-Body   = *chunk
                        last-chunk
                        trailer
                        CRLF

       chunk          = chunk-size [ chunk-extension ] CRLF
                        chunk-data CRLF
       chunk-size     = 1*HEX
       last-chunk     = 1*("0") [ chunk-extension ] CRLF

       chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
       chunk-ext-name = token
       chunk-ext-val  = token | quoted-string
       chunk-data     = chunk-size(OCTET)
       trailer        = *(entity-header CRLF)

   The chunk-size field is a string of hex digits indicating the size of
   the chunk. The chunked encoding is ended by any chunk whose size is
   zero, followed by the trailer, which is terminated by an empty line.

   The trailer allows the sender to include additional HTTP header
   fields at the end of the message. The Trailer header field can be
   used to indicate which header fields are included in a trailer (see
   section 14.40).



NB: i campi opzionali chunk-estension non sono da considerare
    il campo trailer lo si effettui vuoto.


 



